<?php if(in_array($action,array('add','update','view'))):?>
	<?php echo App::Helper('Utility')->callElementByPath(App::Config()->rootDir('/component/appstore/elements/productleft.phtml'));?>		
		<?php if(App::Component('appStore')->Helper('Common')->hasUpdateAccess($action)):?>
			<form method="post" action="<?php echo App::Config()->baseUrl("/managestore/products/{$action}/{$id}"); ?>" enctype="multipart/form-data">				
		<?php endif;?>
			<!-- Product Information -->
			<div class="box box-left">
				<div class="title toggle" id="product_information">
					<h5><?php echo $this->__('Product Information');?></h5>
				</div>
				<div class="form product_information">
					<div class="fields">			
						<div class="field">
							<div class="label">
								<label for="title"><?php echo $this->__("Title ");?></label>
							</div>
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->inputTag(
											"data[Product][title]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'title'),
											array("id" => "title", "class" => "app_input check_notempty")
										);
								?>
							</div>
						</div>					
						<div class="field">
							<div class="label">
								<label for="shortdesc"><?php echo $this->__("Short Description:"); ?></label>
							</div>			
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->textareaTag(
											"data[Product][shortdesc]", 
											App::Component('appStore')->Helper('Common')->getProductValue($product,'shortdesc'), 
											array("rows"=>"12","id" => "shortdesc", "class" => "app_input")
										);
								?>
							</div>
						</div>	
						<div class="buttons">
							<div class="input">		
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'product_information',$id);?>
							</div>
						</div>									
					</div>		
				</div>	
			</div>
			<div class="box box-right" >
				<div class="title">
					<h5><?php echo $this->__('Description');?></h5>
				</div>
				<div class="form product_information ">
					<div class="fields">	
						<div class="field">
							<div class="label">
								<label for="title"><?php echo $this->__("Promo Text");?></label>
							</div>
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->inputTag(
											"data[Product][promotext]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'promotext'),
											array("id" => "promotext", "class" => "app_input check_notempty")
										);
								?>
							</div>
						</div>					
						<div class="field">
							<div class="label">
								<label for="description"><?php echo $this->__("Description:"); ?></label>
							</div>			
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->textareaTag(
											"data[Product][description]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'description'), 
											array("rows"=>"12","id" => "description", "class" => "app_input check_notempty")
										);
								?>
							</div>
						</div>	
						<div class="buttons">
							<div class="input">		
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'product_information',$id);?>
							</div>
						</div>							
					</div>
				</div>
			</div>
			<div class="clearboth"></div>	
			
			<!-- Feature Table Information -->
			<div class="box box-left">
				<div class="title toggle" id="feature_table">
					<h5><?php echo $this->__('Feature Table');?></h5>
				</div>
				<div class="form feature_table">
					<div class="fields">			
						<div class="field">
							<div class="label">
								<label for="features"><?php echo $this->__("Features:"); ?></label>
							</div>
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->textareaTag("data[Product][features]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'features'), 
											array("rows"=>"5","id" => "features", "class" => "app_input")
										);
								?>
							</div>
						</div>		
						<div class="buttons">
							<div class="input">			
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'feature_table',$id);?>
							</div>
						</div>								
					</div>		
				</div>	
			</div>
			<div class="box box-right" >
				<div class="title">
					<h5><?php echo $this->__('Help');?></h5>
				</div>
				<div class="form feature_table">
					<div class="fields">	
						<div class="field">
							Saperate each Title and Value by '=' symbole
						</div>					
						<div class="field">
							Set Title on left side and value on right side
						</div>					
						<div class="field">
							Saperate each line by pressing enter(New Line)
						</div>						
						<div class="field">
							<strong>Example:</strong> Size=Small
						</div>					
					</div>
				</div>
			</div>
			<div class="clearboth"></div>	
			
			<!-- Category Information -->
			<div class="box box-left">
				<div class="title toggle" id="category_information">
					<h5><?php echo $this->__('Category Information');?></h5>
				</div>
				<div class="form category_information">
					<div class="fields">			
						<div class="field">
							<div class="label">
								<label for="category"><?php echo $this->__("Category:"); ?></label>
							</div>
							<div class="input">
								<?php 
									echo App::CategorySet('product-cat')
										->Tag(
											"data[Product][category][]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'category'),
											null,
											array("id"=>"category","class"=>"check_notempty","multiple"=>"multiple","style"=>"width:99%;height:150px")
										);
								?>
							</div>
						</div>
						<div class="buttons">
							<div class="input">			
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'category_information',$id);?>
							</div>
						</div>								
					</div>		
				</div>	
			</div>
			<div class="box box-right" >
				<div class="title">
					<h5><?php echo $this->__('Help');?></h5>
				</div>
				<div class="form  category_information">
					<div class="fields">	
						<div class="field">
							Click on the category for single category selection.
						</div>
						<div class="field">
							Hold CTRL key and Click on cateogry for multiple selection.
						</div>								
					</div>
				</div>
			</div>				
			<div class="clearboth"></div>	
			
			<!-- Product Type -->
			<div class="box box-left" >
				<div class="title toggle"id="product_type_information">
					<h5><?php echo $this->__('Product Type');?></h5>
				</div>
				<div class="form product_type_information ">
					<div class="fields">	
						<div class="field">
							<div class="label">
								<label for="type"><?php echo $this->__("Product Type:"); ?></label>
							</div>			
							<div class="input">
								<?php 
									$type = App::Component('appStore')->Helper('Common')->getProductValue($product,'type','Shippable');
									echo App::load("Helper/Html")
										->selectTag(
											"data[Product][type]",
											array("Shippable"=>"Shippable","Virtual"=>"Virtual"),
											$type, 
											array("id" => "type", "class" => "check_notempty"),
											array("off_blank"=>"Yes")
										);?>
							</div>
						</div>		
						<div class="field <?php if($type != 'Shippable'):?>displaynone<?php endif;?>" id="shipableproduct_box">
							<div class="label">
								<label for="shippingmethod"><?php echo $this->__("Select Shipping Method:"); ?></label>
							</div>			
							<div class="input">
								<?php 
									echo App::CategorySet('shippingrole')
										->Tag(
											"data[Product][shippingmethod]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'shippingmethod'),
											array("id"=>"shippingmethod","class"=>"app_input")
										);
								?>
							</div>
						</div>		
						<div id="virtualproduct_box" class="<?php if($type != 'Virtual'):?>displaynone<?php endif;?>">
							<div class="field">
								<div class="label">
									<label for="downloadfilepath"><?php echo $this->__("Download file path:"); ?></label>
								</div>			
								<div class="input">
									<?php 
										echo App::Html()
											->inputTag(
												"data[Product][downloadfilepath]",
												App::Component('appStore')->Helper('Common')->getProductValue($product,'downloadfilepath'),
												array("id"=>"downloadfilepath","class"=>"app_input")
											);
									?>
								</div>
							</div>	
							<div class="field">
								<div class="label">
									<label for="downfilepath_file_input"><?php echo $this->__("Or Upload file:"); ?></label>
								</div>			
								<div class="input">
									<?php 
										echo App::Html()
											->fileTag(
												"data[Product][downfilepath_file_input]",
												"",
												array("id"=>"downfilepath_file_input","class"=>"dwn_file_input_box")
											);
										?>
								</div>
							</div>
						</div>			
						<div class="buttons">
							<div class="input">			
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'product_type_information',$id);?>
							</div>
						</div>									
						
					</div>
				</div>
			</div>
			<div class="box box-right">
				<div class="title toggle">
					<h5><?php echo $this->__('Help');?></h5>
				</div>
				<div class="form product_type_information">
					<div class="fields">							
						<div class="field">
							For virtual produtc please upload a file or enter a path.
						</div>					
						<div class="field">
							File upload will undate download path entry. 
						</div>		
						<div class="field">
							If full path is not defile then default path will consider for source file.
						</div>
						<div class="field">
							Default path: <strong>{basedir}/component/appstore/virtualproductfiles/</strong>
						</div>									
					</div>
				</div>	
			</div>					

			<div class="clearboth"></div>	
			
			<!-- Product Price -->
			<div class="box box-left">
				<div class="title toggle" id="price_information">
					<h5><?php echo $this->__('Price');?></h5>
				</div>
				<div class="form price_information ">
					<div class="fields">			
						<div class="field">
							<div class="label">
								<label for="supplierprice"><?php echo $this->__("Suplier Price:"); ?></label>
							</div>
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->inputTag(
											"data[Product][supplierprice]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'supplierprice'),
											array("id" => "supplierprice", "class" => "app_input")
										);
								?>
							</div>
						</div>				
						<div class="field">
							<div class="label">
								<label for="oldprice"><?php echo $this->__("Old Price:"); ?></label>
							</div>
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->inputTag(
											"data[Product][oldprice]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'oldprice'),
											array("id" => "oldprice", "class" => "app_input")
										);
									?>
							</div>
						</div>								
						<div class="field">
							<div class="label">
								<label for="price"><?php echo $this->__("Sale Price:"); ?></label>
							</div>
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->inputTag(
											"data[Product][price]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'price'),
											array("id" => "price", "class" => "app_input check_notempty")
										);
								?>
							</div>
						</div>	
						<div class="buttons">
							<div class="input">			
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'price_information',$id);?>
							</div>
						</div>																	
					</div>		
				</div>	
			</div>
			<div class="box box-right" >
				<div class="title">
					<h5><?php echo $this->__('Help');?></h5>
				</div>
				<div class="form price_information">
					<div class="fields">						
						<div class="field">
							<strong>Suplier Price:</strong> The orginal price of product purchase.
						</div>	
						<div class="field">
							<strong>Old Price:</strong> Old previous price of the product.
						</div>			
						<div class="field">
							<strong>Sale Price:</strong> The saling price of the product in the website.
						</div>											
						<div class="field">
							<strong>Note:</strong> If Old Price is grater then Sale Price then old price will display as discount with a line through. <br />For example: 
							<span style="text-decoration:line-through">$150</span>
							
						</div>									
					</div>
				</div>
			</div>					
			<div class="clearboth"></div>	
			
			<!-- Inventory Information -->
			<div class="box box-left">
				<div class="title toggle" id="Inventory_information">
					<h5><?php echo $this->__('Inventory');?></h5>
				</div>
				<div class="form Inventory_information ">
					<div class="fields">			
						<div class="field">
							<div class="label">
								<label for="qty"><?php echo $this->__("Quantity:"); ?></label>
							</div>			
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->inputTag(
											"data[Product][qty]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'qty'), 
											array("id" => "qty", "class" => "app_input")
										);
								?>
							</div>
						</div>	
						<div class="field">
							<div class="label">
								<label for="criticalqty"><?php echo $this->__("Critical  Quantity:"); ?></label>
							</div>
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->inputTag(
											"data[Product][criticalqty]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'criticalqty'),
											array("id" => "criticalqty", "class" => "app_input")
										);
								?>
							</div>
						</div>	
						<div class="buttons">
							<div class="input">			
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'Inventory_information',$id);?>
							</div>
						</div>								
					</div>		
				</div>	
			</div>
			<div class="box box-right" >
				<div class="title">
					<h5><?php echo $this->__('Help');?></h5>
				</div>
				<div class="form Inventory_information ">
					<div class="fields">						
						<div class="field">
							<strong>Qunatity:</strong> New Qunatity to refil the store.
						</div>	
						<div class="field">
							<strong>Critical  Qunatity:</strong> If quantity reach Critical Qunatity then system issue an email alert on every purchase.
						</div>			
					</div>
				</div>
			</div>
			<div class="clearboth"></div>					
			
			<!-- Attribute Information -->
			<div class="box box-left">
				<div class="title toggle" id="attribute_information">
					<h5><?php echo $this->__('Attributes Group');?></h5>
				</div>
				<div class="form attribute_information">
					<div class="fields">			
						<div class="field">
							<div class="label">
								<label for="attributegroup"><?php echo $this->__("Select a Group:"); ?></label>
							</div>
							<div class="input">
								<?php 
									echo App::InformationSet('attributegroup')
										->Tag(
											"data[Product][attributegroup]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'attributegroup'),
											array('key'=>'id','val'=>'name'),
											array("id"=>"attributegroup")
										);
								?>
							</div>
						</div>
					</div>	
					<div class="fields">	
						<div  id='attribute_information_fields'>
						<?php 								
							echo  App::Component('appStore')
								->Helper('Common')
								->getAttributeHtmlBox(
									(isset($product['attributegroup']) ? $product['attributegroup'] : null),
									$product
								);
						?>
						</div>
						<div class="buttons">
							<div class="input">			
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'attribute_information',$id);?>
							</div>
						</div>									
					</div>							
				</div>							
			</div>
			<div class="box box-right" >
				<div class="title">
					<h5><?php echo $this->__('Help');?></h5>
				</div>
				<div class="form attribute_information">
					<div class="fields">						
						<div class="field">
							Select <strong>Attribute:</strong> to enter product spacific information.
						</div>	
						<div class="field">
							Create new attribute group with fields from <strong><a href="<?php echo App::Config()->baseUrl("/managestore/productattributes");?>" target="_blank">Product Attributes Manager</a></strong>
						</div>
						<div class="field">
							<strong>Note:</strong> Product detail page will display a group of products which has been tagged in same group.
						</div>			
					</div>
				</div>
			</div>
			<div class="clearboth"></div>		
			
			<!-- Product Image Manager -->
			<div class="box box-left">
				<div class="title toggle" id="image_information">
					<h5><?php echo $this->__('Product Image');?></h5>
				</div>
				
				<div class="form image_information ">
					<div class="fields">		
						<div class="field">
							<div class="label">
								<label for="imagethumb"><?php echo $this->__("Thumbnail:"); ?></label>
							</div>
							<?php if( $imagethumb = App::Component('appStore')->Helper('Common')->getProductValue($product,'imagethumb')):?>
							<div class="input">
								<div class="imagespan">
									<img src="<?php echo App::Config()->filemanagerurl(DS . $imagethumb); ?>" height="40" />
									<?php if(App::Component('appStore')->Helper('Common')->hasUpdateAccess($action)):?>
									<img class="delete_image" style="cursor:pointer" longdesc="{'action':'imagethumb','pid':'<?php echo $id; ?>'}" src="<?php echo App::Config()->baseUrl('/images/admin/remove.gif');?>">
									<?php endif;?>
								</div>																				
							</div>
							<?php endif;?>																
							<div class="input">
								<?php echo App::load("Helper/Html")->fileTag("data[Product][imagethumb]","", array("id" => "imagethumb", "class" => "app_input check_notempty"));?>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<label for="image"><?php echo $this->__("Product Image:"); ?></label>
							</div>
							<?php if( $image = App::Component('appStore')->Helper('Common')->getProductValue($product,'image')):?>
							<div class="input">
								<div class="imagespan">
									<img src="<?php echo App::Config()->filemanagerurl(DS . $image); ?>" height="40" />
									<?php if(App::Component('appStore')->Helper('Common')->hasUpdateAccess($action)):?>
									<img class="delete_image" style="cursor:pointer" longdesc="{'action':'image','pid':'<?php echo $id; ?>'}" src="<?php echo App::Config()->baseUrl('/images/admin/remove.gif');?>">
									<?php endif;?>
								</div>	 
							</div>
							<?php endif;?>										
							<div class="input">
								<?php echo App::load("Helper/Html")->fileTag("data[Product][image]","", array("id" => "image", "class" => "app_input check_notempty"));?>
							</div>
						</div>
						<div class="field">
							<div class="label">
								<label for="slidetype"><?php echo $this->__("Presentation Type:"); ?></label>
							</div>			
							<div class="input">
								<?php 
									$slidetype = App::Component('appStore')->Helper('Common')->getProductValue($product,'slidetype');
									echo App::load("Helper/Html")
										->selectTag(
											"data[Product][slidetype]",
											array("Zoom"=>"Zoom","NewWindow"=>"NewWindow","StaticImage"=>"StaticImage","None"=>"None"),
											$slidetype,
											array("id" => "slidetype", "class" => "check_notempty"),
											array("off_blank"=>"Yes")
										);?>
							</div>
						</div>					
						<div class="large-image <?php if(!in_array($slidetype,array('NewWindow'))):?> displaynone<?php endif;?>">
							<div class="field" >
								<div class="label">
									<label><?php echo $this->__("Select Image:"); ?>(*.JPE,*.JPEG)</label>
								</div>																	
								<?php if( $slidetype != 'Zoom' && $imagelist = App::Component('appStore')->Helper('Common')->getProductValue($product,'imagelist')): ?>
									<div class="input">
										<div class="imagespan">
											<img src="<?php echo App::Config()->filemanagerurl(DS . $imagelist); ?>" height="40" />
											<?php if(App::Component('appStore')->Helper('Common')->hasUpdateAccess($action)):?>
											<img class="delete_image" style="cursor:pointer" longdesc="{'action':'imagelist','pid':'<?php echo $id; ?>'}" src="<?php echo App::Config()->baseUrl('/images/admin/remove.gif');?>">
											<?php endif;?>
										</div>	 
									</div>
								<?php endif;?>
								<div class="input">				
									<?php echo App::load("Helper/Html")->fileTag("data[Product][largeimage]","", array("class" => "app_input check_notempty"));?>
								</div>
							</div>		
						</div>
						<div class="slide-image-pan <?php if($slidetype != 'Zoom'):?> displaynone<?php endif;?>">
							<?php if( $slidetype == 'Zoom' and ($imagelist = App::Component('appStore')->Helper('Common')->getProductValue($product,'imagelist'))): ?>
								<?php $list = explode(',',$imagelist);?>
								<?php for($ii = 0; $ii < count($list); $ii += 3):?>
									<div class="field">		
										<?php if(isset($list[$ii])):?>
										<span class="imagespan">
											<img title="<?php echo $list[$ii];?>" src="<?php echo App::Config()->filemanagerurl(DS . $list[$ii]); ?>" height="30" />
											<img class="delete_image"  style="cursor:pointer" longdesc="{'action':'imagelist','pid':'<?php echo $id; ?>','name':'<?php echo $list[$ii]; ?>'}" src="<?php echo App::Config()->baseUrl('/images/admin/remove.gif');?>">										
										</span>	
										<?php endif;?>
										<?php if(isset($list[$ii+1])):?>										
										<span class="imagespan">
											<img title="<?php echo $list[$ii+1];?>" src="<?php echo App::Config()->filemanagerurl(DS . $list[$ii+1]); ?>" height="40" />
											<img class="delete_image"  style="cursor:pointer" longdesc="{'action':'imagelist','pid':'<?php echo $id; ?>','name':'<?php echo $list[$ii+1]; ?>'}" src="<?php echo App::Config()->baseUrl('/images/admin/remove.gif');?>">										
										</span>	 
										<?php endif;?>										
										<?php if(isset($list[$ii+2])):?>
										<span class="imagespan">
											<img title="<?php echo $list[$ii+2];?>" src="<?php echo App::Config()->filemanagerurl(DS . $list[$ii+2]); ?>" height="60" />
											<img class="delete_image"  style="cursor:pointer" longdesc="{'action':'imagelist','pid':'<?php echo $id; ?>','name':'<?php echo $list[$ii+2]; ?>'}" src="<?php echo App::Config()->baseUrl('/images/admin/remove.gif');?>">										
										</span>	 						
										<?php endif;?>		
									</div>														
								<?php endfor;?>					
							<?php endif;?>
							<div class="buttons">
								<div class="input">			
									<?php echo App::load("Helper/Html")->buttonTag("data[Product][addimage]","Add Image", array("id"=>"addimage"));?>
								</div>
							</div>		
						</div>	
						<div class="buttons">
							<div class="input">			
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'image_information',$id);?>
							</div>
						</div>									
					</div>		
				</div>	
			</div>
			<div class="box box-right" >
				<div class="title">
					<h5><?php echo $this->__('Help');?></h5>
				</div>
				<div class="form image_information ">
					<div class="fields">	
						<div class="field">
							<strong>Thumbnail:</strong> Product image shows in List, Card and Online Invoice.									
						</div>	
						<div class="field">
							<strong>Product Image:</strong> Shows in product detail page if Slide Show is not set.									
						</div>	
						<div class="field">
							<strong>Zoom:</strong> Upload zoom image as per the ratio of Product Image.									
						</div>	
						<div class="field">
							<strong>New Window:</strong> Show the large image in new Web Page Popup.									
						</div>	
						<div class="field">
							<strong>Static Image:</strong> Shows the Product Image in detail Page.									
						</div>		
						<div class="field">
							<strong>Slide Show:</strong> Create a Slide	Show in product detail page.
						</div>									
					</div>
				</div>
			</div>
			<div class="clearboth"></div>

			<!-- Product Image Manager -->
			<div class="box box-left">
				<div class="title toggle" id="image_gallery_information">
					<h5><?php echo $this->__('Product Image Gallery');?></h5>
				</div>
				
				<div class="form image_gallery_information ">
					<div class="fields">		
						<?php $galleryimagelist = App::Component('appStore')->Helper('Common')->getProductValue($product,'galleryimagelist')?>
						<?php if(!empty($galleryimagelist)):?>
							<?php $imgList = explode(',',trim($galleryimagelist));?>
							<?php foreach($imgList as $img):?>
							<div class="field imagespan">
								<img class="delete_image"  style="cursor:pointer" longdesc="{'action':'galleryimagelist','pid':'<?php echo $id; ?>','name':'<?php echo $img; ?>'}" src="<?php echo App::Config()->baseUrl('/images/admin/remove.gif');?>">										
								<img title="<?php echo $img;?>" src="<?php echo App::Config()->filemanagerurl(DS . $img); ?>" height="40" />
								<?php echo $img;?>
							</div>
							<?php endforeach;?>
						<?php endif;?>
						<div class="gallery-image-pan">
							<div class="buttons">
								<div class="input">			
									<?php echo App::load("Helper/Html")->buttonTag("data[Product][addimage]","Add Image", array("id"=>"galleryimage"));?>
								</div>
							</div>	
						</div>
						<div class="buttons">
							<div class="input">			
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'image_information',$id);?>
							</div>
						</div>																
					</div>		
				</div>	
			</div>
			<div class="box box-right" >
				<div class="title">
					<h5><?php echo $this->__('Help');?></h5>
				</div>
				<div class="form image_gallery_information">
					<div class="fields">
						<div class="field">
							<strong>Thumbnail:</strong> Product image shows in List, Card and Online Invoice.									
						</div>	
						<div class="field">
							<strong>Product Image:</strong> Shows in product detail page if Slide Show is not set.									
						</div>	
						<div class="field">
							<strong>Zoom:</strong> Upload zoom image as per the ratio of Product Image.									
						</div>	
						<div class="field">
							<strong>New Window:</strong> Show the large image in new Web Page Popup.									
						</div>	
						<div class="field">
							<strong>Static Image:</strong> Shows the Product Image in detail Page.									
						</div>		
						<div class="field">
							<strong>Slide Show:</strong> Create a Slide	Show in product detail page.
						</div>									
					</div>
				</div>
			</div>
			<div class="clearboth"></div>

			
					
			<div class="box box-left">
				<div class="title toggle" id="related_product_information">
					<h5><?php echo $this->__('Related Product');?></h5>
				</div>
				<div class="form related_product_information ">
					<div class="fields">			
							<div style="height:205px;overflow:auto">
								<?php 
									echo App::Component('appStore')
										->Helper('Common')
										->getReletedProduct(
											$id,
											App::Component('appStore')
												->Helper('Common')
												->getProductValue($product,'relatedproduct')
										);
								?>
							</div>
						<div class="buttons">
							<div class="input">			
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'related_product_information',$id);?>
							</div>
						</div>									
							
					</div>		
				</div>	
			</div>
			<div class="box box-right" >
				<div class="title">
					<h5><?php echo $this->__('Help');?></h5>
				</div>
				<div class="form related_product_information">
					<div class="fields">	
						<div class="field">
							Check multiple item to tag with a Product.  
						</div>	
						<div class="field">
							Related Product offer user to purchase other relete item in your shop.
						</div>
					</div>
				</div>
			</div>
			<div class="clearboth"></div>
			
			<div class="box box-left">
				<div class="title toggle" id="other_information">
					<h5><?php echo $this->__('Other');?></h5>
				</div>
				<div class="form other_information">
					<div class="fields">	
						<div class="field">		
							<div class="label">
								<label for="note"><?php echo $this->__("Note:"); ?></label>
							</div>
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->textareaTag(
											"data[Product][note]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'note'),
											array("id" => "note", "rows"=>"5","class" => "app_input")
										);
								?>
							</div>
						</div>	
						<div class="field">		
							<div class="label">
								<label for="redirectafteradd2card"><?php echo $this->__("Redirect after adding to cart:"); ?></label>
							</div>
							<div class="input">
								<?php 
									echo App::load("Helper/Html")
										->inputTag(
											"data[Product][redirectafteradd2card]",
											App::Component('appStore')->Helper('Common')->getProductValue($product,'redirectafteradd2card'), 
											array("id" => "redirectafteradd2card", "rows"=>"9","class" => "app_input")
										);
								?>
							</div>
						</div>									
						<div class="buttons">
							<div class="input">		
								<?php echo App::Component('appStore')->Helper('Common')->productManagerInsideButton($action,'other_information',$id);?>
							</div>
						</div>																
					</div>		
				</div>	
			</div>
			<div class="box box-right" >
				<div class="title">
					<h5><?php echo $this->__('Help');?></h5>
				</div>
				<div class="form other_information" >
					<div class="fields">
						<div class="field">
							<strong>Note</strong> Keep a note as future reference for Back Office Operation
						</div>	
						<div class="field">
							<strong>Redirection:</strong>  Enter an URL to redirect when user click on Add To Cart button.
						</div>
						<div class="field">
							Before redirection cart session create automatically.
						</div>							
						<div class="field">
							<strong>URL Format example:</strong> http://www.example.com/[id] 
						</div>														
						<div class="field">
							<strong>[id]</strong> replaced by product id. 
						</div>																					
					</div>
				</div>
			</div>	
			<div class="clearboth" id="meta_information"></div>		
			<?php App::Helper('Toolbar')->setTitle("Meta Information")->Render(array('code'=>'appstore_order_top'));?>
			<?php
				$Grid = App::Module('DataGrid')->clear()
					->setDisplay('FormListing')
					->addRow("Page Title",App::Html()->inputTag('data[Product][pagetitle]',App::Component('appStore')->Helper('Common')->getProductValue($product,'pagetitle'),array('class'=>'app_input')))
					->addRow("Page Keywords",App::Html()->inputTag('data[Product][pagekeys]',App::Component('appStore')->Helper('Common')->getProductValue($product,'pagekeys'),array('class'=>'app_input')))
					->addRow("Page Description",App::Html()->inputTag('data[Product][pagedec]',App::Component('appStore')->Helper('Common')->getProductValue($product,'pagedec'),array('class'=>'app_input')))
					->Render();	
			?>
			<?php if(App::Component('appStore')->Helper('Common')->hasUpdateAccess($action)):?>
				<?php App::Helper('Toolbar')->setBtnSave()->setBtnBack()->Render(array('code'=>'appstore_order_bottom'));	?>
			<?php else:?>
				<?php App::Helper('Toolbar')->setBtnBack()->Render(array('code'=>'appstore_order_bottom'));	?>
			<?php endif;?>
			
		</form>	
	<?php echo App::Helper('Utility')->callElementByPath(App::Config()->rootDir('/component/appstore/elements/productright.phtml'),array('id'=>$id));?>		
<?php else:?>
	<?php App::Helper('Toolbar')->setTitle("View Products")->setBtnBack()->Render(array('code' => 'product_list_view_top'));?>
	<?php $dataList = App::Component('appStore')->Helper('common')->getProductList();?>
	<?php if(!empty($dataList['data'])):?>
	<?php	
			$Grid = App::Module('DataGrid')
				->setHeader(array($this->get_tag('input', array('type' => 'checkbox', 'class' => 'checkall')), '#', 'Thumb','Title',"Qty","Status",'Options'))
				->setFooter($dataList['paging_str']);
				
			foreach($dataList['data'] as $row){
				$Grid->addRow(
					$this->get_tag('input', array('type' => 'checkbox')),
					$row['id'],
					App::Html()->imgTag(App::Config()->filemanagerurl("/{$row['imagethumb']}"),null,array("height"=>"50")),
					$row['title'],
					$row['qty'],
					$row['status'],
					 App::load("Helper/Html")->linkTag(App::Config()->baseUrl('/managestore/products/view/' . $row['id']), App::load("Helper/Html")->imgTag($this->baseurl('/images/admin/view.gif'), NULL, array('title' => 'View ', 'alt' => 'Edit', "class" => "icon")), array("title" => "View"))
					. App::load("Helper/Html")->linkTag(App::Config()->baseUrl('/managestore/products/update/' . $row['id']), App::load("Helper/Html")->imgTag($this->baseurl('/images/admin/edit.gif'), NULL, array('title' => 'Edit ', 'alt' => 'Edit', "class" => "icon")), array("title" => "Edit"))
					. App::load("Helper/Html")->linkTag(App::Config()->baseUrl('/managestore/products/delete/' . $row['id']), App::load("Helper/Html")->imgTag(App::Config()->baseurl('/images/admin/remove.gif'), NULL, array('title' => 'Delete', 'alt' => 'Delete')), array('class' => 'confirm-link icon'))
				);
			}
			$Grid->Render();
	?>
	<?php else:?>
		<h3 class="first"><a href="<?php echo $this->baseUrl("/managestore/products/add");?>">Click here to add new product</a></h3>
	<?php endif;?>
	<?php App::Helper('Toolbar')->setBtnBack()->Render(array('code' => 'product_list_view_bottom'));?>
<?php endif;?>